package com.ny.controller;
import com.ny.entity.Users;
import com.ny.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/login")
    public String login (String userneme,String password){

        Users users = userService.login(userneme,password);
        if (users!=null){
            return "classroom";
        }
        else {
            return "login";
        }
    }


}

